package cn.com.self.apis.portal.service.intf;

import cn.com.self.apis.portal.entity.RequirementsEntity;
import cn.com.self.apis.portal.entity.dto.RequirementsDTO;
import cn.com.self.apis.portal.entity.dto.RequirementsDTO2;
import cn.com.self.apis.portal.util.ICustomPage;
import cn.com.selfsoft.smartcity.core.service.GenericService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.data.domain.Pageable;
import org.springframework.http.ResponseEntity;

import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.Map;

/**
 * @author CRL
 * @date 2021/1/9 14:26
 */
public interface IRequirementsService extends GenericService<RequirementsEntity, String, RequirementsEntity> {

    ResponseEntity createRequirements(RequirementsDTO requestBody);

    ResponseEntity deletesRequirements(String id);

    ResponseEntity updateRequirements(String id, RequirementsDTO requestBody);

//    ResponseEntity getRequirementsPage(HttpServletRequest request, Pageable page);

    ResponseEntity getRequirementsById(String id);

//    Map queryRequirementsEntityList(Map<String, Object> queryParams);
    ICustomPage<RequirementsDTO2> queryRequirementsEntityList(Map<String, Object> queryParams, Pageable page);

    /**
     * 根据id获取需求发布
     * @param queryParams 查询条件
     * @return
     */
    public RequirementsDTO2 getRequirementsById2(Map<String, Object> queryParams);

    ResponseEntity getRequirementsCountByDate();

}

